package Exception;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @Author: Miyako
 * @Date: 2024-07-17-15:51
 * @Description:
 */
public class TryCatchDemo01 {
    public static void main(String[] args) {
        FileOutputStream f=null;
        try {
           f = new FileOutputStream("11.txt");
            f.write(99);
        } catch (IOException E2){
            E2.printStackTrace();
        }finally {
            System.out.println("1");
            if (f!=null){
                try {
                    f.close();
                }catch (IOException e){
                    System.out.println(e.getMessage());
                }
            }
        }

    }
}
